package uy.com.dino.samefile.util;

import java.io.File;
import java.io.FileFilter;

public class FileFilterImpl implements FileFilter {

    private String extension;

    public void setExtension(String extension) {
        this.extension = extension;
    }

    public boolean accept(File file) {
        String name = file.getName();
        boolean ret = file.isDirectory() || name.endsWith(extension);
        return ret;
    }
}
